<template>
  <div class="main">
    <div class="welcome">
      <p>WELCOME TO JPETSTORE</p>
    </div>
    <div class="buttonClass">
      <router-link to="/signon">
        <button><span>登录</span></button>
      </router-link>
      <router-link to='/mainForm'>
        <button><span>以游客身份浏览</span></button>
      </router-link>
    </div>
    <div class="top">
      <a href="mainForm">
        <div class="tlCorner"></div>
      </a>
      <div class="trCorner">
        <ul>
          <li>店铺介绍</li>
          <li><a href="help.html">帮助</a></li>
          <li>联系我们</li>
          <li id="userInfo"></li>
        </ul>
      </div>
    </div>
  </div>
  <br>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'index',
  components: {
    HelloWorld
  }
}
</script>

<style scoped>
@font-face {
  font-family: 'winterCat';
  src: url("../assets/font/WinterCat.otf");
}

@font-face {
  font-family: 'huayuan';
  src: url("../assets/font/花园肉丸.ttf");
}

.main {
  /*大小设置*/
  width: 100vm;
  height: 100vh;
  /*位置关系*/
  position: relative;
  /*背景图片*/
  background-image: url("../assets/img/cat_2.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-background-size: cover;
  -o-background-size: cover;
  background-position: center -110px;
  overflow: hidden;
}

.welcome {
  width: 100vmax;
  /*位置*/
  position: relative;
  top: 170px;
  text-align: center;
  margin: 0 auto;

  /*字体*/
  font-family: winterCat;
  font-size: 70px;
  color: white;
}

.buttonClass {
  width: 50%;
  position: relative;
  top: 340px;
  display: flex;
  flex-direction: row;
  margin: 0 auto;
}

.buttonClass button {
  width: 240px;
  height: 80px;
  border-radius: 14px;
  border: none;
  background-color: antiquewhite;
  opacity: 60%;
  font-size: 22px;
  font-family: huayuan;
  color: rgb(244, 183, 103);
  display: block;
  margin: 0 auto;
  padding: 5px;
  cursor: pointer;
}

.buttonClass button span {
  display: inline-block;
  position: relative;
  transition: 0.5s;
}

.buttonClass button span:after {
  content: '\00bb';
  position: absolute;
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

.buttonClass button:hover span {
  padding-right: 25px;
}

.buttonClass button:hover span:after {
  opacity: 1;
  right: 0;
}

.buttonClass a {
  color: rgb(244, 183, 103);
  display: block;
  margin: 0 auto;
}

/* 页面顶部 */
.top {
  height: 100px;
  width: 100%;
  position: absolute;
  top: 25px;
}

/* 左上角logo */
.tlCorner{
  width: 160px;
  height: 500px;
  position: absolute;
  left: 24px;
  background-image: url('../assets/img/logo.png');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 85%;
}

/* 右上角 */
.trCorner ul{
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  position: absolute;
  right: 50px;
}

.trCorner li {
  list-style: none;
  color: beige;
  font-size: 18px;
  font-family: huayuan;
  margin: 12px;
}

/* 右上角头像 */
.trCorner #userInfo{
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #fff;
  position: relative;
  left: 14px;
  margin: 0 auto;
  background-image: url('../assets/img/cat_avatar_01.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center 0;
}


#inform hr{
  border:1px;
  width: 325px;
  margin-bottom: 0px;
}


.trCorner #userInfo {
  background-color: #fff;

}

.trCorner a {
  color: beige;
}

a:visited {
  color: beige;
}

</style>